<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="de.laures.cewolf.ChartPostProcessor"%>
<%@page import="java.awt.*" %>
<%@page import="java.util.*"%>
<%@page import="de.laures.cewolf.*"%>
<%@page import="de.laures.cewolf.cpp.*"%>
<%@page import="de.laures.cewolf.example.*"%>
<%@page import="de.laures.cewolf.links.*"%>
<%@page import="de.laures.cewolf.taglib.CewolfChartFactory" %>
<%@page import="de.laures.cewolf.tooltips.*"%>
<%@page import="org.jfree.chart.*"%>
<%@page import="org.jfree.chart.event.ChartProgressEvent" %>
<%@page import="org.jfree.chart.event.ChartProgressListener" %>
<%@page import="org.jfree.chart.plot.*"%>
<%@page import="org.jfree.data.*"%>
<%@page import="org.jfree.data.category.*"%>
<%@page import="org.jfree.data.gantt.*"%>
<%@page import="org.jfree.data.general.*"%>
<%@page import="org.jfree.data.time.*"%>
<%@page import="org.jfree.data.xy.*"%>
<%@taglib uri="http://cewolf.sourceforge.net/taglib/cewolf.tld" prefix="cewolf" %>
<%
DatasetProducer xyzData = new DatasetProducer() {
    public Object produceDataset(Map params) {
		DefaultXYZDataset xyzDS = new DefaultXYZDataset();
		double[] ds = { 2.1, 2.3, 2.3, 2.2, 2.2, 3.8, 3.3, 2.9, 2.3, 4.8 };
		double[] ds_1_ = { 14.1, 11.1, 10.0, 8.8, 8.7, 8.4, 5.4, 4.1, 4.1, 20.0 };
		double[] ds_2_ = { 2.4, 2.7, 2.7, 2.2, 2.2, 2.2, 2.1, 2.2, 1.6, 4.0 };
		double[][] ds_3_ = { ds, ds_1_, ds_2_ };
		xyzDS.addSeries("Some bubbles", ds_3_);
		return xyzDS;
    }
    public String getProducerId() {
      return "XYZDataProducer";
    }
    public boolean hasExpired(Map params, Date since) {
      return false;
    }
  };
  pageContext.setAttribute("xyzData", xyzData);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<cewolf:chart id="bubble" title="Bubbles" type="bubble">
    <cewolf:data>
        <cewolf:producer id="xyzData" />
    </cewolf:data>
</cewolf:chart>
<cewolf:img chartid="bubble" renderer="/cewolf" width="800" height="400" />
</body>
</html>